/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.gui;

import br.com.controllers.Controller;
import br.com.models.Discipline;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.ParseException;
import java.util.ArrayList;
import javax.swing.DefaultListModel;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.text.MaskFormatter;

/**
 *
 * @author Valdigleis
 */
public class EditWindowDiscipline extends javax.swing.JDialog {

    private Controller controller;
    
    private JFrame parent;
    
    private Discipline oldDiscipline;
    
    private ArrayList<Discipline> disciplines;
    
    private DefaultListModel model;
    
    private Discipline editDiscipline;
    
    private ArrayList<Discipline> disciplinesToEditDiscipline;
    
    private MaskFormatter formatterName = new MaskFormatter();
    
    private MaskFormatter formatterCode = new MaskFormatter();
    /**
     * Creates new form EditWindowDiscipline
     */
    public EditWindowDiscipline(JFrame parent, Discipline discipline) {
        super(parent, true);
        this.oldDiscipline = discipline;
        initComponents();
        try{
            formatterName.setMask("U*************************************************");
            formatterName.setInvalidCharacters("0456789!?/|[]{}ªº°");
            formatterName.install(name);
            formatterCode.setMask("###UUU");
            formatterCode.setInvalidCharacters("!?/|[]{}ªº°");
            formatterCode.install(code);
        }catch(ParseException e){
            System.out.println(e.getMessage());
        }
        this.OLDnameLabel.setText(this.oldDiscipline.getName());
        this.OLDcodeLabel.setText(this.oldDiscipline.getCode());
        this.OLDcredtislabel.setText(Integer.toString(this.oldDiscipline.getCredits()));
        this.OLDsemesterLabel.setText(Integer.toString(this.oldDiscipline.getSemester()));
        this.model = new DefaultListModel();
        for(int i=0; i < this.oldDiscipline.getPreRequisite().size(); i++){
            this.model.addElement(this.oldDiscipline.getPreRequisite().get(i).getName());
        }
        this.oldListPre.setModel(this.model);
        this.oldListPre.setEnabled(false);
        this.controller = new Controller();
        this.disciplines = controller.seacherAllDiferentsOFDiscipline(this.oldDiscipline.getId());
        DefaultListModel model2 = new DefaultListModel();
        for(int i=0; i < this.disciplines.size(); i++){
            if(this.disciplines.get(i).getName().equals(this.oldDiscipline.getName())){
                
            }else{
                model2.addElement(this.disciplines.get(i).getName());
            }
        }
        this.Listpre.setModel(model2);
        this.Listpre.setEnabled(false);
        for(int i=0; i< 8; i++){
            semester.addItem(i+1);
        }
        this.credits.setSelectedIndex(this.oldDiscipline.getCredits()/2 - 1);
        this.semester.setSelectedIndex(this.oldDiscipline.getSemester()-1);
        semester.addActionListener(new ActionListener(){
            @Override
            public void actionPerformed(ActionEvent e){
                if(semester.getSelectedIndex() > 0){
                    Listpre.setEnabled(true);
                }else{
                    Listpre.setEnabled(false);
                }
            }
           }
        );
        this.name.setText("");
        this.code.setText("");
        this.editDiscipline = new Discipline();
        this.disciplinesToEditDiscipline = new ArrayList<Discipline>();
        setResizable(false);
        Rectangle parentBounds = parent.getBounds();
        Dimension size = getSize();
        // Center in the parent
        int x = Math.max(0, parentBounds.x + (parentBounds.width - size.width) / 2);
        int y = Math.max(0, parentBounds.y + (parentBounds.height - size.height) / 2);
        setLocation(new Point(x, y));
        setVisible(true);
    }

    private boolean getInfos(){
        getNameCode();
        if(this.controller.checkCode(this.editDiscipline.getCode())){
            JOptionPane.showMessageDialog(parent, "Esta código já está em uso por outra disciplina");
            return false;
        }
        getCreditsSemester();
        getPreRequisites();
        if(checkdisiplines(this.editDiscipline.getPreRequisite())){
            String msg = "As informações:\n";
            int err = 1;
            if(testName(this.editDiscipline.getName())){
                this.editDiscipline.setName(this.oldDiscipline.getName());
            }else{
                msg = msg.concat("Nome\n");
                err = 0;
            }
            if(testCode(this.editDiscipline.getCode())){
                this.editDiscipline.setCode(this.oldDiscipline.getCode());
            }else{
                msg = msg.concat("Código\n");
                err = 0;
            }
            if(testCredits(this.editDiscipline.getCredits())){
                this.editDiscipline.setCredits(this.oldDiscipline.getCredits());
            }else{
                msg = msg.concat("Créditos\n");
                err = 0;
            }
            if(testSemester(this.editDiscipline.getSemester())){
                this.editDiscipline.setSemester(this.oldDiscipline.getSemester());
            }else{
                msg = msg.concat("Semestre\n");
                err = 0;
            }
            if(this.editDiscipline.getPreRequisite().isEmpty()){
                this.editDiscipline.setPreRequisite(this.oldDiscipline.getPreRequisite());
            }else{
                msg = msg.concat("Pré-requisitos\n");
                err = 0;
            }
            if(err == 0){
                msg = msg.concat("Atualizados com sucesso!\n");
                JOptionPane.showMessageDialog(parent, msg);
                return true;
            }else{
                JOptionPane.showMessageDialog(parent, "nenhum dado atualizado!");
                return false;
            }
        }else{
            return false;
        }
    }
    
    private void getNameCode(){
        this.editDiscipline.setName(this.name.getText().trim());
        this.editDiscipline.setCode(this.code.getText().trim());
    }
    
    private void getCreditsSemester(){
        this.editDiscipline.setCredits((this.credits.getSelectedIndex()+1)*2);
        this.editDiscipline.setSemester(this.semester.getSelectedIndex()+1);
    }
    
    private void getPreRequisites(){
        for(int i = 0; i < this.disciplines.size(); i++){
            if(this.Listpre.isSelectedIndex(i)){
                this.disciplinesToEditDiscipline.add(this.disciplines.get(i));
            }
        }
        this.editDiscipline.setPreRequisite(this.disciplinesToEditDiscipline);
    }
    
    private boolean testName(String name){
        return (name.equals("") || name.equals(this.oldDiscipline.getName()));
    }
    
    private boolean testCode(String code){
        return (code.equals("") || code.equals(this.oldDiscipline.getCode()));
    }
    
    private boolean testCredits(int credits){
        return credits == this.oldDiscipline.getCredits();
    }
    
    private boolean testSemester(int semester){
        return semester == this.oldDiscipline.getSemester();
    }
    
    private boolean checkdisiplines(ArrayList<Discipline> disList){
        int controll = 1;
        String msg = "Pré requisitos:\n";
        for(int i = 0; i < disList.size(); i++){
            if(disList.get(i).getSemester() >= this.oldDiscipline.getSemester()){
                msg = msg.concat(disList.get(i).getName()+"\n");
                controll = 0;
            }
        }
        if(controll == 1){
            msg = msg.concat("Pré-requisitos de "+ this.editDiscipline.getName()+" carregados com sucesso!");
            return true;
        }else{
            msg = msg.concat("Inválidos");
            JOptionPane.showMessageDialog(parent, msg);
            return false;
        }
    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jInternalFrame1 = new javax.swing.JInternalFrame();
        jLabel3 = new javax.swing.JLabel();
        OLDnameLabel = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        OLDcodeLabel = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        OLDcredtislabel = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        OLDsemesterLabel = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        oldListPre = new javax.swing.JList();
        jLabel7 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jInternalFrame2 = new javax.swing.JInternalFrame();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        credits = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        semester = new javax.swing.JComboBox();
        jLabel12 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        Listpre = new javax.swing.JList();
        jButton2 = new javax.swing.JButton();
        name = new javax.swing.JFormattedTextField();
        code = new javax.swing.JFormattedTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Edição de Disciplina");

        jInternalFrame1.setTitle("Dados Atuais");
        jInternalFrame1.setVisible(true);

        jLabel3.setText("Nome:");

        OLDnameLabel.setText("aaaaa");

        jLabel4.setText("Código:");

        OLDcodeLabel.setText("aaaaa");

        jLabel5.setText("Créditos");

        OLDcredtislabel.setText("aaaa");

        jLabel6.setText("Semestre:");

        OLDsemesterLabel.setText("aaaa");

        jScrollPane1.setViewportView(oldListPre);

        jLabel7.setText("Lista de pré-requisitos atuais");

        jButton1.setText("Mater dados atuais");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout(jInternalFrame1.getContentPane());
        jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);
        jInternalFrame1Layout.setHorizontalGroup(
            jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jInternalFrame1Layout.createSequentialGroup()
                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jInternalFrame1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jInternalFrame1Layout.createSequentialGroup()
                                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3)
                                    .addComponent(jLabel4))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(OLDnameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
                                    .addComponent(OLDcodeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(jInternalFrame1Layout.createSequentialGroup()
                                    .addComponent(jLabel6)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(OLDsemesterLabel))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jInternalFrame1Layout.createSequentialGroup()
                                    .addComponent(jLabel5)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(OLDcredtislabel, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jInternalFrame1Layout.createSequentialGroup()
                                .addGap(55, 55, 55)
                                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel7)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(jInternalFrame1Layout.createSequentialGroup()
                        .addGap(84, 84, 84)
                        .addComponent(jButton1)))
                .addContainerGap(21, Short.MAX_VALUE))
        );
        jInternalFrame1Layout.setVerticalGroup(
            jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jInternalFrame1Layout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(OLDnameLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(OLDcodeLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(OLDcredtislabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(OLDsemesterLabel))
                .addGap(15, 15, 15)
                .addComponent(jLabel7)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 66, Short.MAX_VALUE)
                .addComponent(jButton1)
                .addContainerGap())
        );

        jInternalFrame2.setTitle("Campos de Edição");
        jInternalFrame2.setVisible(true);

        jLabel8.setText("Nome:");

        jLabel9.setText("Código");

        jLabel10.setText("Créditos");

        credits.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2", "4" }));
        credits.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                creditsActionPerformed(evt);
            }
        });

        jLabel11.setText("Semestre");

        jLabel12.setText("Selecione os pré-requisitos");

        Listpre.setToolTipText("Segure a tecla \"ctrl\" para multiplas escolhas!");
        jScrollPane2.setViewportView(Listpre);

        jButton2.setText("Atualizar Dados!");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jInternalFrame2Layout = new javax.swing.GroupLayout(jInternalFrame2.getContentPane());
        jInternalFrame2.getContentPane().setLayout(jInternalFrame2Layout);
        jInternalFrame2Layout.setHorizontalGroup(
            jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jInternalFrame2Layout.createSequentialGroup()
                .addGap(0, 15, Short.MAX_VALUE)
                .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jInternalFrame2Layout.createSequentialGroup()
                            .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(name, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(code, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jInternalFrame2Layout.createSequentialGroup()
                            .addComponent(jLabel10)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(credits, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jLabel11)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(semester, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jInternalFrame2Layout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel12)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(26, 26, 26))
            .addGroup(jInternalFrame2Layout.createSequentialGroup()
                .addGap(59, 59, 59)
                .addComponent(jButton2)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jInternalFrame2Layout.setVerticalGroup(
            jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jInternalFrame2Layout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(code, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(credits, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11)
                    .addComponent(semester, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(27, 27, 27)
                .addComponent(jLabel12)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 56, Short.MAX_VALUE)
                .addComponent(jButton2)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addComponent(jInternalFrame1)
                .addGap(18, 18, 18)
                .addComponent(jInternalFrame2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jInternalFrame1, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jInternalFrame2))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        this.disciplinesToEditDiscipline.clear();
        if(getInfos()){
            this.editDiscipline.setId(this.oldDiscipline.getId());
            this.controller.updateDiscipline(this.editDiscipline);
            this.dispose();
        }
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        this.dispose();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void creditsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_creditsActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_creditsActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JList Listpre;
    private javax.swing.JLabel OLDcodeLabel;
    private javax.swing.JLabel OLDcredtislabel;
    private javax.swing.JLabel OLDnameLabel;
    private javax.swing.JLabel OLDsemesterLabel;
    private javax.swing.JFormattedTextField code;
    private javax.swing.JComboBox credits;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JInternalFrame jInternalFrame1;
    private javax.swing.JInternalFrame jInternalFrame2;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JFormattedTextField name;
    private javax.swing.JList oldListPre;
    private javax.swing.JComboBox semester;
    // End of variables declaration//GEN-END:variables
}
